static int max_path_length (void);
+static int debug_conversions = 0;
double _babl_legal_error (void)
{
error = babl_parse_double (env);
else
error = BABL_LEGAL_ERROR;
+
+ env = getenv ("BABL_DEBUG_CONVERSIONS");
+ if (env && env[0] != '\0')
+ debug_conversions = 1;
+ else
+ debug_conversions = 0;
+
return error;
}
return max_length;
}
-
/* The task of BablFishPath construction is to compute
* the shortest path in a graph where formats are the vertices
* and conversions are the edges. However, there is an additional
fpi.destination = pc->to_format;
get_path_instrumentation (&fpi, pc->current_path, &path_cost, &ref_cost, &path_error);
+ if(debug_conversions && current_length == 1)
+ fprintf (stderr, "%s error:%f cost:%f \n",
+ babl_get_name (pc->current_path->items[0]),
+ /*babl_get_name (pc->fish_path->fish.source),
+ babl_get_name (pc->fish_path->fish.destination),*/
+ path_error,
+ path_cost /*, current_length*/);
if ((path_cost < ref_cost) && /* do not use paths that took longer to compute than reference */
(path_cost < pc->fish_path->fish_path.cost) &&
BablList *list;
int i;
-
list = current_format->format.from_list;
if (list)
{
destination,
dest_bpp,
n);
-
}
static long
ret = -1;
break;
}
-
return ret;
}
*path_error = babl_rel_avg_error (fpi->destination_rgba_double,
fpi->ref_destination_rgba_double,
- fpi->num_test_pixels * 4);
+ fpi->num_test_pixels * 4);
#if 0
fpi->fish_rgba_to_source->fish.processings--;